package com.qf.controller;

import com.qf.dto.R;
import com.qf.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author ztf
 * @Date 11:37 2022/1/10
 **/
@RestController
@RequestMapping("/menus")
public class MenuController {
    private MenuService menuService;

    @Autowired
    public void setMenuService(MenuService menuService) {
        this.menuService = menuService;
    }

    @PostMapping("/menu/enable")
    public R updateEnable(String enable,Integer menuId){
        menuService.updateMenuEnable(enable,menuId);
        return R.setOK();
    }
}
